<?php declare(strict_types=1);
/**
 * @author      guosir
 * @copyright   2023-2025 owner
 **/

namespace Srv\Apps\Apis\Order;

use Srv\Apps\Apis\Order\Ctl\PayGoogleCtl;
use Srv\Apps\Proto\Enum\ErrCodeEnum;
use Srv\Apps\Proto\Enum\LangKeyEnum;
use Srv\Apps\Proto\VO\Order\PayGoogleKeyListVO;
use Srv\Libs\ConfModel\RouteConfData;
use Srv\Libs\Frame\ActionAbstract;
use Srv\Libs\Frame\DTOAbstract;
use Srv\Libs\Frame\Lang;
use Srv\Libs\Frame\ResponseData;
use Srv\Libs\Frame\VOAbstract;

final class PayGoogleAct extends ActionAbstract
{
    /**
     * @url /pay/google/key/list
     * @auth getPayGoogleKeyList
     * @rsp Srv.Apps.Proto.VO.Order.PayGoogleKeyListVO
     * Google支付产品Key列表
     */
    public function getPayGoogleKeyList(RouteConfData $RouteConfData, ?DTOAbstract $DTOClass, ?VOAbstract $VOClass):bool
    {
        unset($RouteConfData, $DTOClass);
        if(!($VOClass instanceof PayGoogleKeyListVO)) return ResponseData::rspErrAuto(ErrCodeEnum::ERR_SYS_PARAMS_ERROR, Lang::get(LangKeyEnum::LANG_SYS_PARAMS_ERROR));
        $VOClass            = PayGoogleCtl::tag()->getPayGoogleKeyList();
        return ResponseData::rspSuccAuto('', $VOClass, []);
    }
}